package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.response.AgencyCertificationAuditResDTO;
import com.jzo2o.customer.service.IAgencyCertAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController("agencyCertAuditController")
@RequestMapping("/agency/agency-certification-audit")
@Api("机构人员实名认证")
public class AgencyCertAuditController {
    @Resource
    private IAgencyCertAuditService agencyCertAuditService;

    @PostMapping
    @ApiOperation("机构人员实名认证接口")
    public void agencyAuthentication(@RequestBody @ApiParam(name = "dto", value = "实名信息")
                                     AgencyCertificationAuditResDTO dto) {
        agencyCertAuditService.agencyRealNameAuthentication(dto);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询当前机构人员用户实名认证的驳回原因接口")
    public Map<String, String> currentAgencyRejectReason(HttpServletRequest request) {
        return agencyCertAuditService.rejectReason(request);
    }
}
